<!--
 * @Author: gaojikai gaojikai@fehorizon.com
 * @Date: 2023-09-11 14:03:09
 * @LastEditors: gaojikai gaojikai@fehorizon.com
 * @LastEditTime: 2023-09-12 18:49:43
 * @FilePath: \electronic-file\src\components\datav\LeftChart2.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
  <div class="left-chart-2">
    <dv-charts class="lc2-chart" :option="option" />
  </div>
</template>

<script>
export default {
  name: "LeftChart2",
  data() {
    return {
      option: {
        series: [
          {
            type: "pie",
            data: [
              { name: "收费系统", value: 93 },
              { name: "通信系统", value: 32 },
              { name: "监控系统", value: 65 },
              { name: "供配电系统", value: 44 },
              { name: "其他", value: 52 },
            ],
            radius: ["45%", "65%"],
            insideLabel: {
              show: false,
            },
            outsideLabel: {
              labelLineEndLength: 10,
              formatter: "{percent}%\n{name}",
              style: {
                fontSize: 14,
                fill: "#fff",
              },
            },
          },
        ],
        color: ["#00baff", "#3de7c9", "#fff", "#ffc530", "#469f4b"],
      },
    };
  },
};
</script>

<style lang="scss" scoped>
.left-chart-2 {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;

  .lc2-chart {
    height: calc(100% - 80px);
    position: relative;
  }
}
</style>
